package com.sky.controller.user;


import com.sky.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;

/**
 * 商铺管理
 */
@RestController("userShopController")
@RequestMapping("/user/shop")
@Slf4j
@Api(tags = "商铺相关接口")
public class ShopController {


    @Autowired
    RedisTemplate redisTemplate;

    /**
     * 查询店铺状态
     */
    @GetMapping("/status")
    @ApiOperation(value = "查询店铺状态")
    public Result<Integer> getStatus()
    {
        Integer shop_status = (Integer)redisTemplate.opsForValue().get("SHOP_STATUS");
          return Result.success(shop_status);
    }
}
